#ifndef GAMESTATE_MAIN_PAUSEMENU_H
#define GAMESTATE_MAIN_PAUSEMENU_H


#include "Engine/Backbone.h"
#include "Interface/Menu.h"
#include "Engine/Visual.h"
#include "Engine/Reason.h"
#include "Engine/Resource/Graphic.h"
#include "Engine/Kinetic/Animation.h"
#include <string>

namespace Misc { struct Frame; } 

namespace GameState {

namespace Main {

class MainEntry : public Interface::Menu::MenuEntry, public Engine::Visual, public Engine::Reason {
  protected:
	Engine::Resource::Graphic entryFg; 
	Engine::Kinetic::Animation menuAnimation; 
	bool focused; 

  public:
	MainEntry(const Misc::Frame & frame, std::string graphicName); 
	virtual Engine::Resource::GraphicList display(); 
	virtual void pulse(int delta); 
	virtual void haveFocus(bool focused); 
	virtual ~MainEntry(); 
};
class EntryMainMenu : public MainEntry {
  public:
	EntryMainMenu(const Misc::Frame & frame); 
	inline void select(); 
};
inline void EntryMainMenu::select() {
	Engine::Backbone::changeContext("masterGameState");
}

class EntryQuit : public MainEntry {
  public:
	EntryQuit(const Misc::Frame & frame); 
	inline void select(); 
};
inline void EntryQuit::select() {
	std::exit(0);
}

class EntryRestart : public MainEntry {
  public:
	EntryRestart(const Misc::Frame & frame); 
	inline void select(); 
};
inline void EntryRestart::select() {
	Engine::Backbone::changeContext("gameplay");
}


} // namespace GameState::Main

} // namespace GameState
#endif
